from selenium.webdriver.common.by import By

from utils.page_base import PageBase #页面基类

#首页ui
class PageUI1(PageBase):
    pathUrl="/"
    # loc_login=By.CSS_SELECTOR,"a[href='/simple/login']" #登录按钮
    loc_login=By.XPATH,"//a[@href='/simple/login']"
    #loc_login=By.XPATH,"href,/simple/login" #简化xpath-》标准xpath

    def __init__(self,driver,base_url):
        PageBase.__init__(self,driver,base_url)


    #打开当前网页
    def openUrl(self):
        self.open(PageUI1.pathUrl)


    #点击“登录”按钮
    def click_login(self):
        self.click(PageUI1.loc_login,isDebug=True)
